<?php
$loader->requireOnce('ordo/EmployeeType.class.php');
class C_Employee extends Controller {
    private $logger;

    function C_Employee($template_mod = "general") {
        parent::Controller();
        $this->logger = LoggerManager::getLogger('module.human_resources.controllers.C_Employee');
        $this->template_mod = $template_mod;
        $this->view->path="employee";        
    }        

    function actionGetDoctorAutoCompleteAjax() {
        $q = $_GET['q'];
        if (!$q) return;
        $result = Celini::newORDO('Employee')->getEmployeeForAutoComplete(
            $q, array(EmployeeType::DOCTOR_ID), false);
                            
        foreach ($result as $item) {
             echo $item['name'] . '|' . $item['alias'] . '|' . $item['person_id'] . "\n";               
        }
    }
}
?>